/**
 * This file is part of the CAKIS project.
 * 
 * Copyright (c) 2009-2010 - Florian Arndt, Christian Kerl
 * 
 * @license GNU Lesser General Public License v3 <http://www.opensource.org/licenses/lgpl-3.0.html>
 * @since   01.03.2010
 * @version SVN: $Id: ProductLookupService.java 43 2010-03-27 17:45:25Z christian-kerl@web.de $
 */

package org.cakis.server.service;

import java.net.URL;

import org.cakis.server.model.Product;

/**
 * Common interface to services, which provide information for products
 * identified by an EAN-8 or EAN-13 number.
 * 
 * @author Christian Kerl
 */
public interface ProductLookupService {

    /**
     * Gets the name of the lookup service.
     * 
     * @return The name.
     */
    String getName();

    /**
     * Gets the base url of the lookup service.
     * 
     * @return The base url.
     */
    URL getUrl();

    /**
     * Queries the lookup service for information on the product identified by
     * the given EAN-8 or EAN-13 number.
     * 
     * @param ean
     *            An EAN-8 or EAN-13 number identifying a product.
     * 
     * @return The product information or null if non were found.
     */
    Product getProductInformation(String ean);
}
